package org.example;

import java.awt.*;
public class Point {
    private int gridX; // 网格X坐标
    private int gridY; // 网格Y坐标
    private Color color;

    public Point(int gridX, int gridY, Color color) {
        this.gridX = gridX;
        this.gridY = gridY;
        this.color = color;
    }

    public int getGridX() { return gridX; }
    public int getGridY() { return gridY; }
    public Color getColor() { return color; }

    public void setGridX(int gridX) { this.gridX = gridX; }
    public void setGridY(int gridY) { this.gridY = gridY; }

    public boolean equals(Point other) {
        return gridX == other.gridX && gridY == other.gridY;
    }

    // 获取像素坐标
    public int getPixelX(int tileSize) { return gridX * tileSize; }
    public int getPixelY(int tileSize) { return gridY * tileSize; }
}